package com.card323.crpg.io;

import com.card323.crpg.io.console.ConsoleMessageSender;
import com.card323.crpg.io.msn.MSNMessageSender;

public class MessageSenderFactory {
	private MessageSenderFactory() {

	}

	private static class SingletonHolder {
		public static final MessageSenderFactory instance = new MessageSenderFactory();
	}

	public static MessageSenderFactory getInstance() {
		return SingletonHolder.instance;
	}
	
	
	
	public MessageSender get_message_sender(String type, String email)
	{
		if(type.equals("msn"))
		{
			return new MSNMessageSender(email);
		}
		if(type.equals("console"))
		{
			return new ConsoleMessageSender();
		}
		
		return null;
	}

}
